﻿



/*
以下代码使用T4自动生成，如果修改那么重新生成后将丢失！
*/
using System;
using System.Xml.Linq;
using System.Xml;
using System.Text;
using System.Collections.Generic;




        namespace YLServerInterface.FunctionalClass
        {
            public class Template
    {
				/// <summary>
		/// YazhiProjectName
		/// </summary>
		public string mYazhiProjectName;
	    public class Files
    {
					    public class File
    {
				/// <summary>
		/// fileName
		/// </summary>
		public string mName;
	        	public static File FromXML(string value)
			{
				var root=XElement.Parse(value);
				var _File=new File();

											_File.mName=root.Element("Name").Value;
				  				return _File;
			}
          public override string ToString()
        {
            StringBuilder sb =new StringBuilder();
            sb.Append("<File>");
                sb.AppendFormat("<Name>{0}</Name>",this.mName	.ToString());
                sb.Append("</File>");
             return sb.ToString();
            }
    }
		public  List<File> mFile =new List<File>();
			        	public static Files FromXML(string value)
			{
				var root=XElement.Parse(value);
				var _Files=new Files();

								  foreach(XElement child in root.Elements())
				  {
				  					_Files.mFile.Add(File.FromXML(child.ToString()));
									}
									return _Files;
			}
          public override string ToString()
        {
            StringBuilder sb =new StringBuilder();
            sb.Append("<Files>");
            foreach(var child in mFile)
            {                 sb.AppendFormat("{0}",child.ToString());
            }
                    sb.Append("</Files>");
             return sb.ToString();
            }
    }
            
		/// <summary>
		/// fileName
		/// </summary>
		public Files mFiles= new Files();                                                                                                                                                                  
        	public static Template FromXML(string value)
			{
				var root=XElement.Parse(value);
				var _Template=new Template();

											_Template.mYazhiProjectName=root.Element("YazhiProjectName").Value;
				  						 _Template.mFiles=Files.FromXML(root.Element("Files").ToString());
				 				return _Template;
			}
          public override string ToString()
        {
            StringBuilder sb =new StringBuilder();
            sb.Append("<Template>");
                sb.AppendFormat("<YazhiProjectName>{0}</YazhiProjectName>",this.mYazhiProjectName	.ToString());
            sb.Append(this.mFiles.ToString());
            sb.Append("</Template>");
             return sb.ToString();
            }
    }
        }
        